<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>background-clip</title>
  <style>
    .box {
      width: 400px;
      height: 400px;
      margin: 0 auto;
      background-color: pink;
      padding: 50px;
      background-image: url("../images/bg02.jpg");
      border: 50px rgba(0,0,0,0.5) dashed;
      background-repeat: no-repeat;
      color: green;
      font-size: 40px;
      /* 从什么地方开始向外裁剪 默认值 从边框外*/
      /*background-clip: border-box;*/
      /* 从padding外*/
      /*background-clip: padding-box;*/
      /* 从内容区外 */
      background-clip: content-box;
    }
  </style>
</head>
<body>
<div class="box">你好啊</div>
</body>
</html>